package com.lianxi;

import java.util.ArrayList;
import java.util.List;

public class ListTest {
    public static void main(String[] args) {
        List list = new ArrayList();
        Student student = new Student();
        list.add(student);
        list.add(100);
        list.add("aaa");

        Student student1=(Student)(list.get(0));
        System.out.println(student1.name);

        System.out.println(((Student)(list.get(0))).name);

        list.remove(student);
        list.remove(1);
        list.removeAll(list);
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
        System.out.println(list.size());

    }

}
